package com.scs.application.modules.wm.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.scs.application.core.entity.SimpleDataEntity;
import com.scs.application.modules.upgrade.db.annotation.EntityClassAnnotation;
import com.scs.application.modules.upgrade.db.annotation.EntityFieldAnnotation;
import com.scs.application.modules.upgrade.db.annotation.EntityIndexAnnotation;
import com.scs.application.modules.upgrade.db.enums.EntityFieldType;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Date;
/**
 * <p>
 * 库存
 * </p>
 */
@Data
@Accessors(chain = true)
@TableName("wm_stock_zero")
@EntityClassAnnotation(remark = "库存0数量表")
@EntityIndexAnnotation(ux = {"sn"},ix={"warehouse_id", "matr_id", "rfid","line_id","sku_qty","supplier_id","sn","flag_consignment","flag_omoc","flag_unique_code"})
public class StockZero extends SimpleDataEntity {

    // id ,在父类中处理

    @EntityFieldAnnotation(
            text = "原始入库单明细ID",
            type = EntityFieldType.LONG,
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String lineId;

    @EntityFieldAnnotation(
            text = "供应商ID",
            type = EntityFieldType.LONG,
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String supplierId;

    @EntityFieldAnnotation(
            text = "供应商名称",
            length = "100",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String supplierName;

    @EntityFieldAnnotation(
            text = "仓库ID",
            type = EntityFieldType.LONG,
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String warehouseId;

    @EntityFieldAnnotation(
            text = "仓库名称",
            length = "50",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String warehouseName;

    @EntityFieldAnnotation(
            text = "货位ID",
            type = EntityFieldType.LONG,
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String locationId;

    @EntityFieldAnnotation(
            text = "货位名称",
            length = "50",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String locationName;

    @EntityFieldAnnotation(
            text = "包ID",
            type = EntityFieldType.LONG,
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String packId;

    @EntityFieldAnnotation(
            text = "包内耗材关联包的stock_id",
            type = EntityFieldType.LONG,
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String packStockId;

    @EntityFieldAnnotation(
            text = "0：非包装耗材;1:跟台包",
            type = EntityFieldType.LONG,
            length = "",
            not_null = false,
            default_value = "0",
            comment = ""
    )
    private String matrType;

    @EntityFieldAnnotation(
            text = "物料ID",
            type = EntityFieldType.LONG,
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String matrId;

    @EntityFieldAnnotation(
            text = "物料名称",
            length = "100",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String matrName;

    @EntityFieldAnnotation(
            text = "物料品规",
            length = "100",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String matrSpec;

    @EntityFieldAnnotation(
            text = "包装单位",
            length = "10",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String packageUnit;

    @EntityFieldAnnotation(
            text = "包装数量",
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private Double packageQty;

    @EntityFieldAnnotation(
            text = "单品单位",
            length = "10",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String skuUnit;

    @EntityFieldAnnotation(
            text = "单品价格",
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private Double skuPrice;

    @EntityFieldAnnotation(
            text = "单品数量",
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private Double skuQty;

    @EntityFieldAnnotation(
            text = "金额",
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private Double amount;

    @EntityFieldAnnotation(
            text = "批次",
            length = "30",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String lot;

    @JSONField(format = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @EntityFieldAnnotation(
            text = "效期",
            type = EntityFieldType.DATE,
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private Date expDate;

    @JSONField(format = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @EntityFieldAnnotation(
            text = "生产日期",
            type = EntityFieldType.DATE,
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private Date mfgDate;

    @JSONField(format = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @EntityFieldAnnotation(
            text = "灭菌日期",
            type = EntityFieldType.DATE,
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private Date sterilizationDate;

    @JsonFormat(pattern="yyyy/MM/dd", timezone = "GMT+8")
    @EntityFieldAnnotation(
            text = "灭菌有效期",
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private Date sterilizationIndate;

    @EntityFieldAnnotation(
            text = "",
            length = "30",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String sn;

    @EntityFieldAnnotation(
            text = "",
            length = "30",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String rfid;

    @EntityFieldAnnotation(
            text = "",
            length = "50",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String udi;

    @EntityFieldAnnotation(
            text = "是否寄售",
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private Boolean flagConsignment;

    @EntityFieldAnnotation(
            text = "是否一物一码",
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private Boolean flagOmoc;

    @EntityFieldAnnotation(
            text = "是否唯一码管理",
            length = "",
            not_null = false,
            default_value = "0",
            comment = ""
    )
    private Boolean flagUniqueCode;

    @EntityFieldAnnotation(
            text = "注册证号",
            length = "100",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String certificateNo;

    @EntityFieldAnnotation(
            text = "厂商",
            length = "200",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String mfgName;

    @EntityFieldAnnotation(
            text = "备注",
            length = "100",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String remark;

    @EntityFieldAnnotation(
            text = "最后修改日期",
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private Date mdate;

    @EntityFieldAnnotation(
            text = "入库时间",
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private Date inTime;


    @EntityFieldAnnotation(
            text = "最近打印时间",
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private Date printTime;


    @EntityFieldAnnotation(
            text = "打印次数",
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private Integer printNum;

    @EntityFieldAnnotation(
            text = "是临时采购",
            length = "100",
            not_null = false,
            default_value = "0",
            comment = "1:是,0:否"
    )
    private Boolean flagTemporaryPurchase;

    @EntityFieldAnnotation(
            text = "状态",
            length = "20",
            not_null = false,
            default_value = "0",
            comment = "状态，0：正常，1:拆分，2：合并"
    )
    private String status;

    @EntityFieldAnnotation(
            text = "状态描述",
            length = "100",
            not_null = false,
            default_value = "正常",
            comment = "0：正常，1:拆分，2：合并"
    )
    private String statusText;

    @EntityFieldAnnotation(
            text = "耗材型号",
            length = "100",
            not_null = false,
            default_value = "",
            comment = "耗材型号"
    )
    private String matrModel;
}
